import { Outlet } from "react-router-dom";
import React from "react";
import { connect } from "react-redux";


const mapStateToProps = state => {
  // state.auth  命名空间中 是以combineReducers  传入的对象的键值为区分的
  return {
    articles: state.auth.articles,
  }
}

const mapDispatchToProps = dispatch => {
  return {
    saveArticle: article => dispatch(article),
  }
}

function User(props) {
    console.log(props);
    // <Outlet />   相当月  {this.props.children}
	return <React.Fragment><div>user  <Outlet />  </div></React.Fragment>;
}

export default connect(mapStateToProps, mapDispatchToProps)(User);